package com.qhg.saas_server.common;


import com.qhg.saas_server.empty.Result;
import com.qhg.saas_server.utils.TencentCOSUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@Slf4j
@Api(tags = "上传文件接口类")
@RequestMapping("/fileUpLoad")
@RestController
public class FileUpload {
    @PostMapping
    @ApiOperation("上传文件接口")
    public Result fileUpload(MultipartFile file){

        String s = TencentCOSUtil.uploadfile(file);

        return Result.success(s);

    }

}
